<%--
  Created by IntelliJ IDEA.
  User: 95344
  Date: 2025/11/6
  Time: 10:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>添加员工</title>
</head>
<body>
<h3>添加员工</h3>
<div>
    <form action="/employee" method="post" enctype="multipart/form-data">
        <!-- 隐藏字段：指定调用add方法 -->
        <input type="hidden" name="method" value="add">

        员工名称：<input type="text" name="empName" placeholder="请输入员工名称" required><br><br>

        密码：<input type="password" name="password" placeholder="请输入密码" required><br><br>

        生日：<input type="date" name="birthday" required><br><br>
        <!-- 注意：type="date"前端会自动提交yyyy-MM-dd格式，与后端DateUtil解析格式匹配 -->

        工资：<input type="text" name="salary" placeholder="请输入工资" required><br><br>

        部门ID：<input type="number" name="depId" placeholder="请输入部门ID" required><br><br>
        <!-- depId是int类型，用number确保输入数字 -->

        起始标识：<input type="number" name="start" placeholder="请输入起始标识（可选）" value="0"><br><br>
        <!-- start字段可选，默认值0 -->

        头像：<input type="file" name="imgUrl" accept="image/*"><br><br>
        <!-- accept="image/*"限制只能上传图片 -->

        <input type="submit" value="提交">
    </form>
</div>
</body>
</html>
